package nine.test_9_24;

import java.util.HashMap;
import java.util.Scanner;

public class TestMain1 {
    public static void main(String[] args) {
        Scanner scanner  = new Scanner(System.in);
        String str = scanner.nextLine();
        HashMap<Character,Integer> hash = new HashMap<>();

        for (int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);
            if(!hash.containsKey(c)) {
                hash.put(c,1);
            } else {
                hash.put(c,hash.get(c) + 1);
            }
        }
        for (int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);
            if(hash.containsKey(c) && hash.get(c) > 1) {
                int j = i;
                while (j < str.length()) {
                    if(c == str.charAt(j)) {
                        System.out.print(c + "," + (j + 1)+ ";");
                    }
                }
                hash.remove(c);
            }
        }
    }
}
